<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>盒子模型测试</title>
    <script src="../heima/js/vue.js"></script>
    <style>
        div {
            background-color: blanchedalmond;
            width: 60%;
            padding: 40px;
            border: 1px solid red; /* 修正了这里的语法 */
            margin: auto;
        }
    </style>
</head>
<body>
    <div id="app">
        <h1>这是一个标题</h1>
        <table cellspacing="0" border="1" width="60%">
            <thead>
                <tr>
                    <th>标题1</th>
                    <th>标题2</th>
                </tr>
            </thead>
            <tbody>
                <tr align="center" v-for="user in lists">
                    <td>{{ user.name }}</td> <!-- 使用<td>而非<th>来显示数据行 -->
                    <td>{{user.age}}</td>
                </tr>
            </tbody>
        </table>
        <input type="text" v-model="message">
        {{message}}
    </div>
    <script>
        new Vue({
            el: '#app',
            data: {
                    message:'demo',
                    lists: [
                        {
                            name: 'a',
                            age: 10
                        },
                        {
                            name: 'b',
                            age: 19
                        }
                    ]
                }
            
        });
    </script>
</body>
</html>